package za.ac.cput.peterjohn.DesignPatternPrincipals.creational.FactoryMethodPattern.Model;

import za.ac.cput.peterjohn.DesignPatternPrincipals.creational.Prototype.Model.Prototype;

public class Dog extends Animal implements Prototype
{
    private String sound;
    
    public Dog() {}

    public Dog(String sound) { this.sound = sound; }
    
    @Override
    public String getSound() { return "Woof"; }

    @Override
    public Prototype doClone(){ return new Dog(sound); }

    @Override
    public String toString() { return sound; }   
}